{extends file="./main.tpl"}
{block name=head}
<script type="text/javascript">
function selectCheck()
{
  var dataString = "userId=" + $('#userId').val();
	$.ajax({
		type: "GET",
		url: "selectCheckBox.php",
		data: dataString,
  	success:function(data)
  	{
  		var str = data;
      var temp = new Array();
      temp = str.split(",");
      for (i=0; i!=temp.length;i++)
      {
        var checkbox = $("input[type='checkbox'][value='"+temp[i]+"']");
        checkbox.attr("checked","checked");
      }
	  }
	});
}
</script>
{/block}
{block name=body}
<form name="createBill" action="{$smarty.server.PHP_SELF}" method="POST">
<table border='0' cellpadding='1' cellspacing='2' align='center'>
  <tr align="center">
  <td colspan="3" class="table1">USER
  <select name="userId" id="userId" autofocus="autofocus" onchange="selectCheck();">
  <option value="" >Select</option>
    {html_options values=$partyArray.userId output=$partyArray.userName}
  </select>
  </td>
</tr>
<tr>
  <td colspan="14" class="table1" align="center"><font size="3">Menu</font></td>
</tr>	
<tr>
  <td  class="table1" align='center' valign="top"><b></b></td>
  <td  class="table1" align='center' valign="top"><b>MenuId</b></td>
  <td  class="table1" align='center' valign="top"><b>Menu Name</b></td>
</tr>
{section name="sec" loop=$incomingRegister}
<tr class="trRow">
	<td class="table2" align="center">
		<input type="checkbox" name="menuId[]" class="getData" value="{$incomingRegister[sec].menuId}" /> <!-- checked="{$checkMenuId}"--> 
	</td>
  <td class="table2" align="center"><input type="text" value="{$incomingRegister[sec].menuId}"></td>
  <td class="table2" align="left" NOWRAP>{$incomingRegister[sec].menuName}</td>
</tr>
{sectionelse}
<tr>
	<td align="center" colspan="13">
   {$msg}
  </td>
</tr> 
{/section}
<tr><td colspan="14"><hr></td></tr>
<tr><td colspan="14" class="table2" align="center"><input type="submit" name="submit" value=" SUBMIT " /></td></tr>
</table>
</form>
{/block}